package Common 
{
	/**
	 * ...
	 * @author Serg de Adelantado
	 */
	public class Room 
	{	
		public var ID:int;
		public var FApartments:String;
		public var FRooms:String;
		protected var FName:String;	
		protected var FInRoom:String;
		protected var FAbout:String;		
		
		public function Room(AID:String, AName:String) 
		{	
			ID = int(AID);
			Name = AName;
			Rooms = '0';
			Apartments = '0';
			InRoom = '';
			About = '';
		}
		
		public function get Name():String
		{ 
			return FName; 
		}
		
		public function set Name(value:String):void 
		{
			FName = Utils.ReplaceAllByRegex(value, '&quot;', '"');
		}
		
		public function get InRoom():String
		{ 
			return FInRoom; 
		}
		
		public function set InRoom(value:String):void 
		{
			if (value)
				FInRoom = Utils.ReplaceAllByRegex(value, '&quot;', '"');
			else
				FInRoom = '';
		}
		
		public function get About():String
		{ 
			return FAbout; 
		}
		
		public function set About(value:String):void 
		{
			if (value)				
				FAbout = Utils.ReplaceAllByRegex(value, '&quot;', '"');
			else
				FAbout = '';
		}
		
		public function get Rooms():String
		{
			return FRooms;
		}
		
		public function set Rooms(value:String):void
		{
			if (value)		
				FRooms = value;
			else
				FRooms = '0';
		}
		
		public function get Apartments():String
		{
			return FApartments;
		}
		
		public function set Apartments(value:String):void
		{
			if (value)		
				FApartments = value;
			else
				FApartments = '0';
		}
	}
}